From: Eli Zaretskii Date: Tue, 29 Mar 2011 19:58:13 +0000 (+0200) Subject: Fix off-by-one in scroll down aggressively. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~4140^2~3 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=9d7b9658ce6e8b47a9c747bd879b883a1b6a22c2;p=emacs.git Fix off-by-one in scroll down aggressively. src/xdisp.c (try_scrolling): When scrolling down aggressively, scroll one screen line less, to make sure we end up at the margin for fractions close to 1. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4f7e5591393..b3d54b9bbcd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-29 Eli Zaretskii + + * xdisp.c (try_scrolling): When scrolling down aggressively, + scroll one screen line less, to make sure we end up at the margin + for fractions close to 1. + 2011-03-28 Eli Zaretskii * xdisp.c (try_scrolling): When point is above the window, allow diff --git a/src/xdisp.c b/src/xdisp.c index 871d070ed31..7983c118134 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13212,7 +13212,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p, amount_to_scroll = float_amount; if (amount_to_scroll == 0 && float_amount > 0) amount_to_scroll = 1; - amount_to_scroll -= this_scroll_margin - dy; + amount_to_scroll -= + this_scroll_margin - dy - FRAME_LINE_HEIGHT (f); /* Don't let point enter the scroll margin near bottom of the window. */ if (amount_to_scroll > height - 2*this_scroll_margin + dy)